package com.hnhy.hnhyscms_ws.service.impl;

import com.hnhy.hnhyscms_ws.dao.ISpstorageDao;
import com.hnhy.hnhyscms_ws.entity.Spstorage;
import com.hnhy.hnhyscms_ws.service.ISpstorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpstorageService implements ISpstorageService {
    @Autowired
    private ISpstorageDao iSpstorageDao;

    @Override
    public List<Spstorage> getAllProducts() {
        return iSpstorageDao.getAllProducts();
    }

    @Override
    public Spstorage getByProductNo(String productNo) {
        return iSpstorageDao.getByProductNo(productNo);
    }

    @Override
    public void addProducts(Spstorage spstorage) { iSpstorageDao.addProducts(spstorage); }

    @Override
    public Spstorage findMaxId() { return iSpstorageDao.findMaxId(); }

    @Override
    public void updateByProductNo(Spstorage spstorage) {
        iSpstorageDao.updateByProductNo(spstorage);
    }

    @Override
    public void changeByProductNo(Spstorage spstorage) {
        iSpstorageDao.changeByProductNo(spstorage);
    }

    @Override
    public void deleteByProductNo(String productNo) {
        iSpstorageDao.deleteByProductNo(productNo);
    }
}
